<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./vue-2.5.js"></script>
</head>
<body>
    <div id="app">
        <my-component inline-template>
            <div>
                <h1>在父组件中定义的模板</h1>
                <p>{{message}}</p>
                <p>{{msg}}</p>
            </div>
        </my-component>
    </div>

    <script>
    Vue.component('my-component',{
        data() {
            return {
                msg:'在子组件中的数据'
            }
        },
    })

    let app = new Vue({
        el:"#app",
        data() {
            return {
                message:'在父组件中的数据'
            }
        },
    })
    
    </script>
</body>
</html>